home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 601 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.8 KB  |  49 lines

  1. Newsgroups: comp.std.c
  2. Path: phcoms4.seri.philips.nl!panther!baynes
  3. From: baynes@ukpsshp1.serigate.philips.nl (Stephen Baynes)
  4. Subject: Re: BoundsChecker and fgets fmalloc problems
  5. Sender: news@ukpsshp1.serigate.philips.nl (account for localnews)
  6. Message-ID: <DoIAz4.E77@ukpsshp1.serigate.philips.nl>
  7. Date: Tue, 19 Mar 1996 08:45:04 GMT
  8. References: <4ikelh$gji@nnrp1.news.primenet.com>
  9. Organization: Philips Semiconductors, Southampton, UK
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Brian Gregory (bri@primenet.com) wrote:
  13. : I am using Bounds Checker v2.5, and am having a problem finding a
  14. : memory leak it is reporting...
  15.  
  16. : Example:
  17.  
  18. : fgets( szBuf, 799, fpIn );
  19.  
  20. : szBuf is an 800 character buffer (pre-sized array)
  21. : fpIn IS a valid pointer
  22. : no memory is corrupt before the fgets line
  23. : The application is a windows app, written in straight C with a large
  24. : memory model.
  25.  
  26. : The problem is Boundschecker consistently reports memory leaks for the
  27. : larger buffer size mallocs contained WITHIN the fgets function...
  28.  
  29. I don't think that the ANSI standard makes any requirement on library functions
  30. that they should not leak memory. (Can anyone construct a requirement from
  31. any execution limit?). So as far as the standard is concerened there is nothing
  32. wrong with your fgets.
  33.  
  34. : Any help on resolving this recurrent problem, or just an indication
  35. : that this is perhaps an erroneous error reported by Boundschecker
  36. : would be greatly appreciated.
  37.  
  38. Quality of implementation issues of specific implementations are
  39. outside the scope of this newsgroup. I suggest you take it up with your
  40. supplier or in the newsgroup for your platform.
  41.  
  42.  
  43.  
  44. --
  45. Stephen Baynes                              baynes@ukpsshp1.serigate.philips.nl
  46. Philips Semiconductors Ltd
  47. Southampton                                 My views are my own.
  48. United Kingdom
  49.